package com.cpdmali.api.helper;

import java.io.IOException;
import java.util.Properties;

import com.cpdmali.api.Exception.BadParameterException;


public class PropertiesInit{
	
	public static Properties initApplicationProperties(String propertiesFile) throws BadParameterException{
		Properties properties = new Properties();
		ConstanteProperties constanteProperties = new ConstanteProperties(propertiesFile);
		try {
			properties.load(PropertiesInit.class.getResourceAsStream(constanteProperties.getPROPERTIES_FILE()));
		} catch (IOException e) {
			e.printStackTrace();
		}
		return properties;
	}
}
